\(\int \frac {\csc ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx\) [104]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 89 \[ \int \frac {\csc ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=\frac {3 \cot ^5(c+d x)}{5 a^3 d}+\frac {4 \cot ^7(c+d x)}{7 a^3 d}-\frac {\csc ^3(c+d x)}{a^3 d}+\frac {7 \csc ^5(c+d x)}{5 a^3 d}-\frac {4 \csc ^7(c+d x)}{7 a^3 d} \]

[Out]

3/5*cot(d*x+c)^5/a^3/d+4/7*cot(d*x+c)^7/a^3/d-csc(d*x+c)^3/a^3/d+7/5*csc(d*x+c)^5/a^3/d-4/7*csc(d*x+c)^7/a^3/d

Rubi [A] (verified)

Time = 0.62 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3957, 2954, 2952, 2687, 30, 2686, 276, 14} \[ \int \frac {\csc ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=\frac {4 \cot ^7(c+d x)}{7 a^3 d}+\frac {3 \cot ^5(c+d x)}{5 a^3 d}-\frac {4 \csc ^7(c+d x)}{7 a^3 d}+\frac {7 \csc ^5(c+d x)}{5 a^3 d}-\frac {\csc ^3(c+d x)}{a^3 d} \]

[In]

Int[Csc[c + d*x]^2/(a + a*Sec[c + d*x])^3,x]

[Out]

(3*Cot[c + d*x]^5)/(5*a^3*d) + (4*Cot[c + d*x]^7)/(7*a^3*d) - Csc[c + d*x]^3/(a^3*d) + (7*Csc[c + d*x]^5)/(5*a
^3*d) - (4*Csc[c + d*x]^7)/(7*a^3*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2952

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 2954

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Dist[(a/g)^(2*m), Int[(g*Cos[e + f*x])^(2*m + p)*((d*Sin[e + f*x])^n/(a - b*Sin[e +
f*x])^m), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = -\int \frac {\cos (c+d x) \cot ^2(c+d x)}{(-a-a \cos (c+d x))^3} \, dx \\ & = -\frac {\int (-a+a \cos (c+d x))^3 \cot ^3(c+d x) \csc ^5(c+d x) \, dx}{a^6} \\ & = \frac {\int \left (-a^3 \cot ^6(c+d x) \csc ^2(c+d x)+3 a^3 \cot ^5(c+d x) \csc ^3(c+d x)-3 a^3 \cot ^4(c+d x) \csc ^4(c+d x)+a^3 \cot ^3(c+d x) \csc ^5(c+d x)\right ) \, dx}{a^6} \\ & = -\frac {\int \cot ^6(c+d x) \csc ^2(c+d x) \, dx}{a^3}+\frac {\int \cot ^3(c+d x) \csc ^5(c+d x) \, dx}{a^3}+\frac {3 \int \cot ^5(c+d x) \csc ^3(c+d x) \, dx}{a^3}-\frac {3 \int \cot ^4(c+d x) \csc ^4(c+d x) \, dx}{a^3} \\ & = -\frac {\text {Subst}\left (\int x^6 \, dx,x,-\cot (c+d x)\right )}{a^3 d}-\frac {\text {Subst}\left (\int x^4 \left (-1+x^2\right ) \, dx,x,\csc (c+d x)\right )}{a^3 d}-\frac {3 \text {Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\csc (c+d x)\right )}{a^3 d}-\frac {3 \text {Subst}\left (\int x^4 \left (1+x^2\right ) \, dx,x,-\cot (c+d x)\right )}{a^3 d} \\ & = \frac {\cot ^7(c+d x)}{7 a^3 d}-\frac {\text {Subst}\left (\int \left (-x^4+x^6\right ) \, dx,x,\csc (c+d x)\right )}{a^3 d}-\frac {3 \text {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\csc (c+d x)\right )}{a^3 d}-\frac {3 \text {Subst}\left (\int \left (x^4+x^6\right ) \, dx,x,-\cot (c+d x)\right )}{a^3 d} \\ & = \frac {3 \cot ^5(c+d x)}{5 a^3 d}+\frac {4 \cot ^7(c+d x)}{7 a^3 d}-\frac {\csc ^3(c+d x)}{a^3 d}+\frac {7 \csc ^5(c+d x)}{5 a^3 d}-\frac {4 \csc ^7(c+d x)}{7 a^3 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.00 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.54 \[ \int \frac {\csc ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=\frac {\csc (c) \csc (c+d x) \sec ^3(c+d x) (-840 \sin (c)+448 \sin (d x)+602 \sin (c+d x)+602 \sin (2 (c+d x))+258 \sin (3 (c+d x))+43 \sin (4 (c+d x))-560 \sin (2 c+d x)+168 \sin (c+2 d x)-280 \sin (3 c+2 d x)-48 \sin (2 c+3 d x)-8 \sin (3 c+4 d x))}{2240 a^3 d (1+\sec (c+d x))^3} \]

[In]

Integrate[Csc[c + d*x]^2/(a + a*Sec[c + d*x])^3,x]

[Out]

(Csc[c]*Csc[c + d*x]*Sec[c + d*x]^3*(-840*Sin[c] + 448*Sin[d*x] + 602*Sin[c + d*x] + 602*Sin[2*(c + d*x)] + 25
8*Sin[3*(c + d*x)] + 43*Sin[4*(c + d*x)] - 560*Sin[2*c + d*x] + 168*Sin[c + 2*d*x] - 280*Sin[3*c + 2*d*x] - 48
*Sin[2*c + 3*d*x] - 8*Sin[3*c + 4*d*x]))/(2240*a^3*d*(1 + Sec[c + d*x])^3)

Maple [A] (verified)

Time = 0.58 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.65

method result size
parallelrisch \(\frac {-5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+14 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}-70 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-35 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )}{560 a^{3} d}\) \(58\)
derivativedivides \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{7}+\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{16 d \,a^{3}}\) \(60\)
default \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{7}+\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{16 d \,a^{3}}\) \(60\)
norman \(\frac {-\frac {1}{16 a d}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{8 d a}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{40 d a}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{112 d a}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{2}}\) \(82\)
risch \(-\frac {2 i \left (35 \,{\mathrm e}^{6 i \left (d x +c \right )}+70 \,{\mathrm e}^{5 i \left (d x +c \right )}+105 \,{\mathrm e}^{4 i \left (d x +c \right )}+56 \,{\mathrm e}^{3 i \left (d x +c \right )}+21 \,{\mathrm e}^{2 i \left (d x +c \right )}-6 \,{\mathrm e}^{i \left (d x +c \right )}-1\right )}{35 a^{3} d \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{7} \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}\) \(104\)

[In]

int(csc(d*x+c)^2/(a+a*sec(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/560*(-5*tan(1/2*d*x+1/2*c)^7+14*tan(1/2*d*x+1/2*c)^5-70*tan(1/2*d*x+1/2*c)-35*cot(1/2*d*x+1/2*c))/a^3/d

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.07 \[ \int \frac {\csc ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=\frac {\cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{3} - 15 \, \cos \left (d x + c\right )^{2} - 18 \, \cos \left (d x + c\right ) - 6}{35 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )} \sin \left (d x + c\right )} \]

[In]

integrate(csc(d*x+c)^2/(a+a*sec(d*x+c))^3,x, algorithm="fricas")

[Out]

1/35*(cos(d*x + c)^4 + 3*cos(d*x + c)^3 - 15*cos(d*x + c)^2 - 18*cos(d*x + c) - 6)/((a^3*d*cos(d*x + c)^3 + 3*
a^3*d*cos(d*x + c)^2 + 3*a^3*d*cos(d*x + c) + a^3*d)*sin(d*x + c))

Sympy [F]

\[ \int \frac {\csc ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=\frac {\int \frac {\csc ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \]

[In]

integrate(csc(d*x+c)**2/(a+a*sec(d*x+c))**3,x)

[Out]

Integral(csc(c + d*x)**2/(sec(c + d*x)**3 + 3*sec(c + d*x)**2 + 3*sec(c + d*x) + 1), x)/a**3

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.01 \[ \int \frac {\csc ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=-\frac {\frac {\frac {70 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {14 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {5 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{3}} + \frac {35 \, {\left (\cos \left (d x + c\right ) + 1\right )}}{a^{3} \sin \left (d x + c\right )}}{560 \, d} \]

[In]

integrate(csc(d*x+c)^2/(a+a*sec(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/560*((70*sin(d*x + c)/(cos(d*x + c) + 1) - 14*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 5*sin(d*x + c)^7/(cos(d
*x + c) + 1)^7)/a^3 + 35*(cos(d*x + c) + 1)/(a^3*sin(d*x + c)))/d

Giac [A] (verification not implemented)

none

Time = 0.36 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.82 \[ \int \frac {\csc ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=-\frac {\frac {35}{a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} + \frac {5 \, a^{18} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 14 \, a^{18} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 70 \, a^{18} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{21}}}{560 \, d} \]

[In]

integrate(csc(d*x+c)^2/(a+a*sec(d*x+c))^3,x, algorithm="giac")

[Out]

-1/560*(35/(a^3*tan(1/2*d*x + 1/2*c)) + (5*a^18*tan(1/2*d*x + 1/2*c)^7 - 14*a^18*tan(1/2*d*x + 1/2*c)^5 + 70*a
^18*tan(1/2*d*x + 1/2*c))/a^21)/d

Mupad [B] (verification not implemented)

Time = 13.48 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.94 \[ \int \frac {\csc ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=-\frac {-16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+8\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+72\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-34\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+5}{560\,a^3\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )} \]

[In]

int(1/(sin(c + d*x)^2*(a + a/cos(c + d*x))^3),x)

[Out]

-(72*cos(c/2 + (d*x)/2)^4 - 34*cos(c/2 + (d*x)/2)^2 + 8*cos(c/2 + (d*x)/2)^6 - 16*cos(c/2 + (d*x)/2)^8 + 5)/(5
60*a^3*d*cos(c/2 + (d*x)/2)^7*sin(c/2 + (d*x)/2))